package com.jumi.microservice.controller.admin;

import com.jumi.microservice.common.base.dto.ResponseResult;
import com.jumi.microservice.common.page.TableDataInfo;
import com.jumi.microservice.dto.afterseal.*;
import com.jumi.microservice.service.admin.afterseal.AdminAfterSealService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author wangjingdao
 */
@RestController
@Api(tags = "售后订单")
@RequestMapping("/afterSeal")
public class AdminAfterSealListController {
    @Resource
    AdminAfterSealService adminAfterSealService;

    @ApiOperation("售后所有订单")
    @GetMapping("getAfterSealAll")
    public TableDataInfo<AfterSealAllResponse> getAfterSealAll(AfterSealAllRequest request) {
        return adminAfterSealService.getAfterSealAll(request);
    }

    @ApiOperation("自营代发货")
    @GetMapping("getAfterSealSelf")
    public TableDataInfo<AfterSealAllResponse> getAfterSealSelf(AfterSealSelfRequest request) {
        return adminAfterSealService.getAfterSealSelf(request);
    }

    @ApiOperation("非自营代发货")
    @GetMapping("getAfterSealNoSelf")
    public TableDataInfo<AfterSealAllResponse> getAfterSealNoSelf(AfterSealNoSelfRequest request) {
        return adminAfterSealService.getAfterSealNoSelf(request);
    }

    @ApiOperation("待收货")
    @GetMapping("getAfterSealGoodsReceived")
    public TableDataInfo<AfterSealAllResponse> getAfterSealGoodsReceived(AfterSealGoodsReceivedRequest request) {
        return adminAfterSealService.getAfterSealGoodsReceived(request);
    }

    @ApiOperation("已完成")
    @GetMapping("getAfterSealCompleted")
    public TableDataInfo<AfterSealAllResponse> getAfterSealCompleted(AfterSealGoodsReceivedRequest request) {
        return adminAfterSealService.getAfterSealCompleted(request);
    }

    @ApiOperation("售后订单详情")
    @GetMapping("getAfterOrderDetails")
    public ResponseResult<AfterSealDetailsResponse> getAfterOrderDetails(AfterOrderDetailsRequest request) {
        return adminAfterSealService.getAfterOrderDetails(request);
    }
    @ApiOperation("海外商品列表")
    @GetMapping("getImportList")
    public TableDataInfo<AfterSealAllResponse> getImportList(AfterSealAllRequest request) {
        return adminAfterSealService.getImportList(request);
    }
}
